home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ada
/
gnat1792.zip
/
gnat179b
/
t-adainc
/
a-strcon.ads
< prev
next >
Wrap
Text File
|
1994-05-19
|
26KB
|
412 lines
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . S T R I N G S . C O N S T A N T S --
-- --
-- S p e c --
-- --
-- $Revision: 1.5 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Maps;
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
package Ada.Strings.Constants is
Control_Set : constant Maps.Character_Set;
Graphic_Set : constant Maps.Character_Set;
Letter_Set : constant Maps.Character_Set;
Lower_Set : constant Maps.Character_Set;
Upper_Set : constant Maps.Character_Set;
Basic_Set : constant Maps.Character_Set;
Decimal_Digit_Set : constant Maps.Character_Set;
Hexadecimal_Digit_Set : constant Maps.Character_Set;
Alphanumeric_Set : constant Maps.Character_Set;
Special_Graphic_Set : constant Maps.Character_Set;
ISO_646_Set : constant Maps.Character_Set;
subtype Full_Character_Map is Maps.Character_Mapping (Character'range);
-- Maps to lower case for letters, else identity
Lower_Case_Map : constant Full_Character_Map;
-- ??? should be defined of the unconstrained type Maps.Character_Mapping
private
subtype Cset is Maps.Character_Set (Character'range);
-- Define constrained subtype so we can use others in aggregates
Control_Set : constant Maps.Character_Set := Cset'(
NUL .. US => True,
DEL => True,
Reserved_128 .. APC => True,
others => False);
Graphic_Set : constant Maps.Character_Set := Cset'(
NUL .. US => False,
DEL => False,
Reserved_128 .. APC => False,
others => True);
Letter_Set : constant Maps.Character_Set := Cset'(
'A' .. 'Z' => True,
'a' .. 'z' => True,
UC_A_Grave .. UC_O_Diaeresis => True,
UC_O_Oblique_Stroke .. LC_O_Diaeresis => True,
LC_O_Oblique_Stroke .. LC_Y_Diaeresis => True,
others => False);
Lower_Set : constant Maps.Character_Set := Cset'(
'a' .. 'z' => True,
LC_German_Sharp_S .. LC_O_Diaeresis => True,
LC_O_Oblique_Stroke .. LC_Y_Diaeresis => True,
others => False);
Upper_Set : constant Maps.Character_Set := Cset'(
'A' .. 'Z' => True,
UC_A_Grave .. UC_O_Diaeresis => True,
UC_O_Oblique_Stroke .. UC_Icelandic_Thorn => True,
others => False);
Basic_Set : constant Maps.Character_Set := Cset'(
'A' .. 'Z' => True,
'a' .. 'z' => True,
UC_AE_Diphthong => True,
LC_AE_Diphthong => True,
LC_German_Sharp_S => True,
UC_Icelandic_Thorn => True,
LC_Icelandic_Thorn => True,
UC_Icelandic_Eth => True,
LC_Icelandic_Eth => True,
others => False);
Decimal_Digit_Set : constant Maps.Character_Set := Cset'(
'0' .. '9' => True,
others => False);
Hexadecimal_Digit_Set : constant Maps.Character_Set := Cset'(
'0' .. '9' => True,
'A' .. 'F' => True,
'a' .. 'f' => True,
others => False);
Alphanumeric_Set : constant Maps.Character_Set := Cset'(
'0' .. '9' => True,
'A' .. 'Z' => True,
'a' .. 'z' => True,
UC_A_Grave .. UC_O_Diaeresis => True,
UC_O_Oblique_Stroke .. LC_O_Diaeresis => True,
LC_O_Oblique_Stroke .. LC_Y_Diaeresis => True,
others => False);
Special_Graphic_Set : constant Maps.Character_Set := Cset'(
Space .. Solidus => True,
Colon .. Commercial_At => True,
Left_Square_Bracket .. Grave => True,
Left_Curly_Bracket .. Tilde => True,
No_Break_Space .. Inverted_Question => True,
Multiplication_Sign => True,
Division_Sign => True,
others => False);
ISO_646_Set : constant Maps.Character_Set := Cset'(
Character'Val (0) .. Character'Val (127) => True,
others => False);
Lower_Case_Map : constant Full_Character_Map := Full_Character_Map'(
NUL => NUL, -- 0
SOH => SOH, -- 1
STX => STX, -- 2
ETX => ETX, -- 3
EOT => EOT, -- 4
ENQ => ENQ, -- 5
ACK => ACK, -- 6
BEL => BEL, -- 7
BS => BS, -- 8
HT => HT, -- 9
LF => LF, -- 10
VT => VT, -- 11
FF => FF, -- 12
CR => CR, -- 13
SO => SO, -- 14
SI => SI, -- 15
DLE => DLE, -- 16
DC1 => DC1, -- 17
DC2 => DC2, -- 18
DC3 => DC3,